import request from '@/utils/request'

export function getPositionList(query) {
  return request({
    url: '/position/search',
    method: 'get',
    params: query
  })
}
export function getPositionDetail(id) {
  return request({
    url: '/position/detail',
    method: 'get',
    params: { id }
  })
}
export function getPositionByCid(params) {
  return request({
    url: '/position/list/cid',
    method: 'get',
    params
  })
}
export function getPositionOption() {
  return request({
    url: '/position/option',
    method: 'get'
  })
}
export function deletePositionOption(data) {
  return request({
    url: '/position/option/delete',
    method: 'post',
    data
  })
}
export function addPositionOption(data) {
  return request({
    url: '/position/option/add',
    method: 'post',
    data
  })
}
export function addPositionOptionType(data) {
  return request({
    url: '/position/option/type/add',
    method: 'post',
    data
  })
}
export function deletePositionOptionType(data) {
  return request({
    url: '/position/option/type/delete',
    method: 'post',
    data
  })
}

export function updatePosition(data) {
  return request({
    url: '/position/update',
    method: 'post',
    data
  })
}
export function deletePositionById(data) {
  return request({
    url: '/position/delete',
    method: 'post',
    data
  })
}
export function sendResume(id) {
  return request({
    url: '/position/sendResume',
    method: 'get',
    params: { id }
  })
}
